package javaTest04.entity;


import javaTest04.exercise01.annotation.Label;
import javaTest04.exercise02.annotation.Column;
import javaTest04.exercise02.annotation.Entity;


@Label("人类")
@Entity("Person")
public class Person {

    @Label("名字")
    @Column(value = "name",maxLength = 10)
    private String name;

    @Label("性别")
    @Column(value = "sex",maxLength = 5)
    private String sex;

    @Label("年龄")
    @Column(value = "age",maxLength = 3)
    private Integer age;

    @Label("身份证")
    @Column(value = "id",maxLength = 20)
    private String idNo;

    @Label("是否已婚")
    @Column(value = "isMarried",maxLength = 1)
    private Boolean isMarried;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public String getIdNo() {
        return idNo;
    }

    public void setIdNo(String idNo) {
        this.idNo = idNo;
    }

    public Boolean getMarried() {
        return isMarried;
    }

    public void setMarried(Boolean married) {
        isMarried = married;
    }

    @Override
    public String toString() {
        return "Person{" +
                "name='" + name + '\'' +
                ", sex='" + sex + '\'' +
                ", age=" + age +
                ", idNo='" + idNo + '\'' +
                ", isMarried=" + isMarried +
                '}';
    }
}


